#include "sobel_parameter.h"
#include "ui_sobel_parameter.h"

sobel_parameter::sobel_parameter(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::sobel_parameter)
{
    ui->setupUi(this);
}

sobel_parameter::~sobel_parameter()
{
    delete ui;
}

double sobel_parameter::get_verschiebung(){
    QString verschiebung_string = ui->verschiebung_lineEdit->text();
    double retval = verschiebung_string.toDouble();
    return retval;
}

/*int sobel_parameter::get_filtersize(){
    QString filtersize_string = ui->filtersize_lineEdit->text();
    int retval = filtersize_string.toInt();
    return retval;
}*/

int sobel_parameter::get_skalierung(){
    QString scale_string = ui->skalierung_lineEdit->text();
    int retval = scale_string.toInt();
    return retval;
}

int sobel_parameter::get_hvcheckbox(){
    // horizontal = 1, vertikal = 2, beides = 3
    int retval = 0;
    if(ui->horizontal_checkBox->isChecked() && !ui->vertikal_checkBox->isChecked()){
        retval = 1;
    }
    if(!ui->horizontal_checkBox->isChecked() && ui->vertikal_checkBox->isChecked()){
        retval = 2;
    }
    if(ui->horizontal_checkBox->isChecked() && ui->vertikal_checkBox->isChecked()){
        retval = 3;
    }

    return retval;
}
